<?php
include($gDOCUMENT_ROOT_SYSTEM.'templates/'.$gTEMPLATE.'/html/section/head.tpl');
?>
<body>
<script type="text/javascript" src="<?php echo $gSYSTEM_URL;?>templates/<?php echo $gTEMPLATE;?>/javascript/font-size.js">
</script>
<?php
include($gDOCUMENT_ROOT_SYSTEM.'templates/'.$gTEMPLATE.'/html/section/top-nav.tpl');
?>
    <div id="wrapper">
    <?php
	include($gDOCUMENT_ROOT_SYSTEM.'templates/'.$gTEMPLATE.'/html/section/header.tpl');
	?>
    <h1><?php echo $language_pack['edit_resource'];?></h1>
    <div id="content">
        <div class="grid-16-8 clearfix">
                <div class="article">
        <div class="indent"><div class="subjectwrap clearfix">
        <div>
                <form action="../resource_save.php" method="post">
                <div>
                	<span class="pl"><?php echo $language_pack['film_source'];?></span>：
                	<?php
		            	$v = array_values($source_type);
		            	$a = array_diff($v,array($data['source_type']));
						echo getRadio('source_type',$language_pack['source_type_array'],$data['source_type'],$a);
					?><br />
					 <input type="hidden" name="source_id" value="<?php echo $source_id;?>" />
					 <input type="hidden" name="douban_id" value="<?php echo $douban_id;?>" />
					<span class="pl"><?php echo $language_pack['compress_type'];?>：</span>
					
					<?php
						echo getRadio('compress_type',$language_pack['blu-ray_compress_type_array'],$compress_type['rip']);
					?>
					 <br />
					<span class="pl"><?php echo $language_pack['resolution_type'];?></span>： 
					<?php
						if($data['source_type']==$source_type['dvd'])
						{
							$v = array_values($source_type);
                			$a = array_diff($v,array($data['source_type']));
							echo getRadio('resolution_type',$language_pack['blu-ray_resolution_type_array'],$resolution_type['480p'],$a);
						}
						else
						{
							echo getRadio('resolution_type',$language_pack['blu-ray_resolution_type_array'],$resolution_type['720p']);
						}
					?>
					<br />
					<span class="pl"><?php echo $language_pack['file_url_ed2k'];?></span>： <textarea name="file_url_ed2k" cols="60" rows="5"></textarea><?php echo $language_pack['notice_ed2k'];?><br />
					<!--<span><span class="pl">http下载地址</span>： <input type="text" name="file_url_http" value="" /></span><br />
					<span><span class="pl">bt种子</span>： <input type="text" name="file_url_bt" value="" /></span><br />-->
					<span><span class="pl"><?php echo $language_pack['resolution'];?></span>： <input type="text" name="resolution_width" value="" />x<input type="text" name="resolution_height" value="" /></span><br />
					<span class="pl"><?php echo $language_pack['runtime'];?>：</span> 
					<input type="text" name="runtime_hour" value="" /><?php echo $language_pack['hour'];?>
					<input type="text" name="runtime_minute" value="" /><?php echo $language_pack['minute'];?>
					<input type="text" name="runtime_second" value="" /><?php echo $language_pack['second'];?>
					<br />
					<span><span class="pl"><?php echo $language_pack['video_bitrate'];?></span>： <input type="text" name="video_bitrate" value="" />Kbps</span><br />
					<fieldset>
                	<legend><?php echo $language_pack['audio_language'];?>：</legend>
                	<?php
						$name = 'spoken_language_id[]';
                		echo getCheckbox($name,$spoken_language_id_and_name).'<br />';
                	?>
                </fieldset>
                <fieldset>
                	<legend><?php echo $language_pack['subtitle_language'];?>：</legend>
                	<ul>
                	<?php
						$name = 'written_language_id[]';
						foreach($written_language_id_and_name as $id=>$text)
						{
							echo '<li><label><input type="checkbox" name="'.$name.'" value="'.$id.'" />'.$text.'</label></li>';
						}
                	?>
                	</ul>
                </fieldset>
					<span><span class="pl"><?php echo $language_pack['promulgator_name'];?></span>： <input type="text" name="promulgator_name" value="<?php echo $user_info['name'];?>" /></span><br />
					<span><span class="pl"><?php echo $language_pack['promulgator_url'];?></span>： <input type="text" name="promulgator_url" value="<?php echo $user_info['url'];?>" /></span><br />
					<span class="pl"><?php echo $language_pack['ripper_name'];?>： <input type="text" name="ripper_name" value="" /></span><br />
					<!--<span class="pl"><?php echo $language_pack['ripper_email'];?>： <input type="text" name="ripper_email" value="" /></span><br />-->
					<span class="pl"><?php echo $language_pack['ripper_url'];?>： <input type="text" name="ripper_url" value="" /></span><br />
					<span class="pl">MediaInfo： <textarea name="media_info" cols="20" rows="10"></textarea></span><br />
					<!--<input type="file" name="poster" /><br />-->
					<input type="submit" value="保存" />
            	</div>
            	</form>
        </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    <?php
include($gDOCUMENT_ROOT_SYSTEM.'templates/'.$gTEMPLATE.'/html/section/footer.tpl');
?>
    </div>

</body>
</html>
